<template>
  <view class="box">
    <view class="bgc">
    </view>
    <view class="company_Card">
      <uni-section title="企业资料" type="line"></uni-section>
        <view class="companyInfo">
          <uni-form ref="baseForm" :modelValue="baseFormData">
            <uni-form-item label="" required class="userType">
                  <uni-section title="*法人类型:"></uni-section>
                  <uni-data-select v-model="userType.value" placeholder="企业法人" :localdata="userType.range"></uni-data-select>
            </uni-form-item>                
            <uni-form-item required class="companyName" >
                  <uni-section title="*企业名称:"></uni-section>
                  <uni-easyinput trim="all" v-model="companyName"></uni-easyinput>
            </uni-form-item>
              <uni-form-item required class="showName">
                <uni-section title="*显示名称:"></uni-section>
                <uni-easyinput trim="all" v-model="showName"></uni-easyinput>
              </uni-form-item>
              <uni-form-item required class="socialCode">
                <uni-section title="*社会信用代码:"></uni-section>
                <view>
                  <uni-easyinput trim="all" v-model="socialCode" placeholder="请输入18位统一社会信用码" class="code"></uni-easyinput>
                </view>
              </uni-form-item>
              <uni-form-item required class="regDate">
                    <uni-section title="*注册时间:"></uni-section>
                    <!-- <uni-data-select v-model="regDate" placeholder="请选择工商注册时间" > -->
                    <view style="width: 220rpx;">
                      <uni-datetime-picker  type="date" :clear-icon="false" v-model="regDate" />
                    </view>
                    <!-- </uni-data-select> -->
              </uni-form-item> 
              <uni-form-item required class="regMoney">
                <uni-section title="*注册资本(万元):"></uni-section>
                <uni-easyinput trim="all" v-model="regMoney"></uni-easyinput>
              </uni-form-item>
              <uni-form-item required class="regPlace">
                    <uni-section title="*注册地区:"></uni-section>
                    <uni-data-select v-model="regPlace.value" placeholder="请选择注册地区" :localdata="regPlace.range"></uni-data-select>
              </uni-form-item>
              <uni-form-item required class="companyType">
                    <uni-section title="*企业类型:"></uni-section>
                    <uni-data-select v-model="companyType.value" placeholder="请选择" :localdata="companyType.range" ></uni-data-select>
              </uni-form-item>
              <uni-forms-item>
                    <uni-section title="*主营业务:"></uni-section>
                    <uni-data-checkbox v-model="checkbox.value" :multiple="false" mode="tag" :localdata="checkbox.range">
                    </uni-data-checkbox>
              </uni-forms-item>
          </uni-form>
        </view>
    </view>
    <view class="button" style="background-color: #3f51b5;height: 120rpx; font-size: 32rpx; color: #fff; font-weight: 500; text-align: center; line-height: 120rpx;" @click="nextStep">
    <text>下一步</text>
    </view>
  </view>
</template>
<script>
  export default {
    data(){
      return{
        userType:{
          value:'',
          range:[{value:0,text:'张三'},{value:1,text:'李四'},{value:2,text:'王二'},{value:3,text:'麻子'}]
        },
        companyName: '',
        showName: '',
        socialCode: '',
        regDate: '',
        regMoney: '',
        regPlace: {
          value: '',
          range:[{value:0,text: "长沙市岳麓区"},{value:1,text: "长沙市开福区"}]
        },
        companyType: {
          value: '',
          range:[{value:0,text: "独资"},{value:1,text: "合资"},{value:2,text: "外企"}]
        },
        checkbox: {
          value: [],
          range: [{value:0,text: "月嫂"},{value:1,text: "育婴师"},{value:2,text: "保洁/清"},{value:3,text: "保姆"},{value:4,text: "早教/托"},{value:5,text: "养老/陪"},
          {value:6,text: "家装/搬"},{value:7,text: "产康师"}]
        }
      }
    },
    methods: {
      nextStep(){
        // 1.回到上一页
        uni.navigateBack()
        // 2.显示提交成功
       uni.showToast({title: '提交成功'})
      }
    }
  }
  
</script>
<style lang="scss">
  .box {
    position: relative;
    .bgc {
      position: absolute;
      width: 100%;
      height: 20px;
      background-color:#3f51b5;
    }
  }
  .company_Card {
    position: absolute;
    left: 5%;
    // bottom: 130rpx;
    width: 90%;
    border-radius: 10rpx;
    background-color: #fff;
    .companyInfo {
      padding: 0 20rpx;
    }
  }
  .userType {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top:1px solid $uni-border-3 ;
    border-bottom: 1px solid $uni-border-3;
  }
  .companyName,.showName,.regMoney  {
    display: flex;
    justify-content: left;
    align-items: center;
    border-bottom:1px solid $uni-border-3 ;
  }
  .socialCode,.regDate,.regPlace,.companyType {
   display: flex;
   justify-content: space-between;
   align-items: center;
   border-bottom:1px solid $uni-border-3 ; 
  }
  .button {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
  }
</style>